<app-nav> </app-nav>
<app-spinner
  *ngIf="isRequesting"
  [delay]="300"
  [message]="'Please wait...'"
  [isRunning]="isRequesting"
></app-spinner>
<div class="container ">
  <div class="row">
    <div class="col-md-12">
      <nav class="mt-4" aria-label="breadcrumb">
        <ol class="breadcrumb">
          <li class="breadcrumb-item">
            <a [routerLink]="['/overview']">Overview</a>
          </li>
          <li class="breadcrumb-item active" aria-current="page">Mint {{ ftName }} Commitment</li>
        </ol>
      </nav>
      <div class="box">
        <div class="box-header">
          <h3>Mint {{ ftName }} Commitment</h3>
        </div>
        <div class="box-body">
          <div class="row form-group">
            <div class="col-sm-12">
              <label>Public {{ ftName }} Balance : {{ ftBalance || 0 }}</label>
            </div>
          </div>
          <div class="row form-group" *ngIf="ftBalance == 0">
            <div class="col-sm-12">
              <p>Not Enough Public {{ ftName }} To Mint.</p>
            </div>
          </div>
          <div class="row" *ngIf="ftBalance > 0">
            <div class="col-md-6">
              <form [formGroup]="ftCommitmentMintForm">
                <div class="form-group">
                  <div class="row col-sm-12">
                    <input
                      type="number"
                      (keypress)="utilService.validate($event)"
                      autoFocus
                      class="form-control simple-text"
                      id="A"
                      formControlName="A"
                      name="A"
                      (keydown)="$event.keyCode == 13 ? mintFTCommitment() : null"
                      placeholder="Enter value of {{ ftName }}"
                    />
                  </div>
                  <div class="row" style="margin-top: 10px;">
                    <div class="col-sm-12">
                      <button
                        type="button"
                        class="btn btn-md btn-primary"
                        [disabled]="ftCommitmentMintForm.invalid"
                        (click)="mintFTCommitment()"
                      >
                        Mint {{ ftName }} Commitment
                      </button>
                    </div>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
